# @Author：silence
# @Email：792245022@qq.com
# @Date：2025/3/7 0:44

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager import chrome

# 1.启动浏览器
driver = webdriver.Chrome(service=Service(chrome.ChromeDriverManager().install()))

# 2.打开网页
driver.get("http://www.baidu.com")

input = driver.find_element(by=By.ID, value="su")

# 获取元素属性 get_attribute
# content = input.get_attribute("class")

# 获取元素文本 text
# content = input.text

# 获取标签名 tag_name
# content = input.tag_name

# print(content)

